<template>
  <div class="index">
    <div class="header" v-if="userData.user_info">
      <van-nav-bar
       v-if="userData.user_info.vip_type_name !== '普通用户'"
        title="分享"
        left-arrow
        @click-left="onClickLeft"
        right-text="展示收益"
        fixed
        @click-right="onClickRight"
      />
       <van-nav-bar
     v-if="userData.user_info.vip_type_name == '普通用户'"
        title="分享"
        left-arrow
        @click-left="onClickLeft"
        fixed
        @click-right="onClickRight"
      />
         
    </div>
    <div class="user-info">
      <div class="user-info-lf" v-if="userData.user_info">
        <img :src="userData.user_info.avatar" class="portrait" alt />
        <div class="user-info-mid">
          <p>{{userData.user_info.username}}</p>
          <span class="ordinary" v-if="ordinaryShow">{{userData.user_info.vip_type_name}}</span>
          <span class="super" v-if="superShow">
            <img src="../assets/images/huiyuan.png" alt />
            <i>{{userData.user_info.vip_type_name}}</i>
          </span>
          <span class="partner" v-if="partnerShow">
            <img src="../assets/images/hehuoren.png" alt />
            <i>{{userData.user_info.vip_type_name}}</i>
          </span>
          <span class="member" v-if="memberShow">
            <img src="../assets/images/ic_shenfenrenzheng@2x.png" alt />
            <i>{{userData.user_info.vip_type_name}}</i>
          </span>
          <span class="member" v-if="userData.user_info.vip_type_name == '城市经销商'">
            <img src="../assets/images/ic_shenfenrenzheng@2x.png" alt />
            <i>{{userData.user_info.vip_type_name}}</i>
          </span>
        </div>
      </div>
      <div class="user-info-rt">
        <p class="time1">
          <span>{{weekEarnings.last_week}}</span>
          : 上周
        </p>
        <p class="time2">
          <span>{{weekEarnings.this_week}}</span>
          : 本周
        </p>
      </div>
    </div>
    <div v-if="userData.parent_user">
    <div
      class="profit"
      v-for="(item,index) in monthEarnings"
      :key="index"
      v-if="index==0&&userData.parent_user.vip_type_name !=='普通会员'"
      @click.stop="profitOnClick"
    >

      <div class="left" :class="{leftClass:userData.parent_user}">
        <div class="profit-lf-top">
          <img src="../assets/images/rili.png" alt />
          <span>{{item.month}}</span>
        </div>
        <div class="profit-lf-mid">
          <div class="number">{{item.earnings_all}}</div>
          <div class="numberName">总收益（佣金）</div>
        </div>
        <div
          class="profit-lf-bt"
          v-if="profitShow&&userData.parent_user"
          @click.stop="profitLfClick"
        >
          <div class="pic">
            <img :src="userData.parent_user.avatar" alt />
          </div>
          <div class="name">
            <span>{{userData.parent_user.username}}</span>
            <i>{{userData.parent_user.vip_type_name}}</i>
          </div>
        </div>
        <div class="dividend" v-if="partnerShow">
          <!-- <p>8.88</p>
          <i>红包分润</i> -->
        </div>
      </div>
      <div class="right">
        <div class="profit-rt-top">
          <div class="number">{{item.first_earnings}}</div>
          <div class="numberName">直接收益</div>
        </div>
        <!-- <div class="profit-rt-mid">
          <div class="number">{{item.secend_earnings}}</div>
          <div class="numberName">间接收益</div>
        </div> -->
        <div class="profit-rt-bt">
          <div class="number number1">{{item.sales_all}}</div>
          <div class="numberName">总销售额</div>
        </div>
      </div>
    </div>
    <div class="middleProfit" v-if="userData.parent_user.vip_type_name =='普通用户'">
      <div class="middleProfitApply">
        <div class="applyVip apply">
          <img src="../assets/images/huiyuan.png" alt="">
          <p>申请超级会员 &nbsp; 360元 / 年</p>
        </div>
        <span>成为超级会员，享受所有功能全开放</span>
      </div>
      <div class="middleProfitApply">
        <div class="applyCity apply">
          <img src="../assets/images/fuwushang.png" alt="">
          <p>申请城市服务商 &nbsp; 1W 元 / 年</p>
        </div>
        <span>原价5W服务商，红利期（8.1-10.1）特惠</span>
      </div>
      <div class="middleProfitApply">
        <div class="applyPartner apply">
          <img src="../assets/images/hehuoren.png" alt="">
          <p>申请城市合伙人 &nbsp; 10W 元 / 年</p>
        </div>
        <span>原价50W合伙人，红利期（8.1-10.1）特惠</span>
      </div>
    </div>
    </div>
    <div class="middle">
      <span class="shar" v-if="ordinaryShow" @click.stop="qrCode">
        去分享推广二维码赚收益
        <img src="../assets/images/gengduo.png" alt />
      </span>
      <div class="table" v-if="tableShow">
        <ul>
          <li @click.stop="myTeamClick">
            我的
            <br />团队
          </li>
          <li @click.stop="incomeClick">
            收益
            <br />明细
          </li>
          <li @click.stop="myShareMemberCodeClick">
            服务商
            <br />会员码
          </li>
          <li @click.stop="qrCode">
            推广
            <br />二维码
          </li>
        </ul>
      </div>
    </div>
    <div class="rev-info">
      <div class="rev-info-inner" v-if="revInfoInnerShow">
        <span class="upgrade" @click.stop="upgradeShow" v-if="ordinaryShow">升级</span>
        <div class="rev-info-inner-top">
          <div class="rev-info-inner-top-lf">
            <img src="../assets/images/fenxiangderen.png" alt />
            <p>分享的人</p>
            <i v-if="ordinaryShow">[分享10人使用可免费升级为会员]</i>
          </div>
          <span class="shared-number" v-if="ordinaryShow">{{earnings.length}}/10</span>
          <span class="member-up" v-if="memberUpShow">已升级</span>
        </div>
        <div class="sharer" v-for="(item,index) in earnings" :key="index">
          <img :src="item.avatar" alt />
          <div class="sharer-rt">
            <div class="sharer-rt-top">
              <p>{{item.username}}</p>
              <div class="sharer-rt-top-rt">
                <img src="../assets/images/hehuoren.png" v-if="hehuorenShow" alt />
                <img src="../assets/images/huiyuan.png" v-if="huiyuanShow" alt />
                <img src="../assets/images/fuwushang.png" v-if="fuwushangShow" alt />
                <img src="../assets/images/ic_shenfenrenzheng@2x.png" v-if="sharerShow" alt />
                <i>{{item.vip_type}}</i>
              </div>
            </div>
            <div class="sharer-rt-bt">
              <p>注册：{{item.vip_end_time}}</p>
              <i>{{item.money}}</i>
            </div>
          </div>
        </div>
      </div>
      <div class="recent-gains rev-info-inner" v-if="recentGainsShow">
        <div class="recent-gains-top">
          <img src="../assets/images/zuijinshouyi.png" alt />
          <p>最近收益</p>
        </div>
        <div class="sharer" v-for="(item,index) in earnings" :key="index">
          <img :src="item.avatar" alt />
          <div class="sharer-rt">
            <div class="sharer-rt-top">
              <p>{{item.username}}</p>
              <div class="sharer-rt-top-rt">
                <img src="../assets/images/hehuoren.png" v-if="hehuorenShow" alt />
                <img src="../assets/images/huiyuan.png" v-if="huiyuanShow" alt />
                <img src="../assets/images/fuwushang.png" v-if="fuwushangShow" alt />
                <img src="../assets/images/ic_shenfenrenzheng@2x.png" v-if="sharerShow" alt />
                <i>{{item.vip_type}}</i>
              </div>
            </div>
            <div class="sharer-rt-bt">
              <p>期限：{{item.vip_end_time}}</p>
              <i>+{{item.money}}元</i>
            </div>
          </div>
        </div>
      </div>
    </div>
    <van-dialog
      v-model="show"
      title="是否确认升级成为会员？"
      message="您将消耗您10个分享使用的用户，这10个用户将不再属于你推荐的，您将享受不到这10个用户未来的收益分成"
      show-cancel-button
      confirm-button-text="升级"
      @confirm="upUserVip"
    ></van-dialog>
    <div class="alert" v-if="alertShow">
      <div class="alert-inner">
        <div class="alert-inner-top">
          <img src="../assets/images/alert1.png" alt />
        </div>
        <div class="alert-inner-bt">
          <p>有效期：2020-12-21</p>
          <span @click.stop="vipUp">马上体验</span>
        </div>
      </div>
    </div>
    <van-dialog
      v-model="profitAlertShow"
      :title="profitDialogTitle"
      :message="profitDialogText"
      show-cancel-button
      confirm-button-text="确认"
      class="profit-alert"
      @confirm="showSales"
      @cancel="profitAlertShow=false"
    ></van-dialog>
    <div v-if="showBind">
      <bindPhone :uid="uid"></bindPhone>
    </div>
  </div>
</template>
<script>
export default {
  name: "index",
  data() {
    return {
      memberShow: false, //会员
      superShow: false, //超级会员
      partnerShow: false, //合伙人
      ordinaryShow: true, //普通用户
      tableShow: false,
      revInfoInnerShow: false, //分享的人界面
      recentGainsShow: false, //最近收益界面
      profitShow: false,
      show: false, //升级弹窗
      alert: false, //升级会员成功弹窗
      profitAlertShow: false, //展示收益弹框
      alertShow: false,
      userData: {},
      earnings: [],
      hehuorenShow: false,
      huiyuanShow: false,
      fuwushangShow: false,
      sharerShow: true,
      weekEarnings: {},
      monthEarnings: [],
      rightShow: false,
      uid: "",
      profitDialogTitle: "",
      profitDialogText: "",
      showBind: false
    };
  },
  mounted() {
    if (this.$route.query.uid) {
      this.uid = this.$route.query.uid;
    }
    this.getUser();
    this.getEarnings();
    this.getWeekEarnings();
    this.getMonthEarnings();
  },
  methods: {
    profitOnClick() {
      if (this.$cookies.get("first_login") != 0) {
        this.showBind = true;
        return;
      }
      this.$router.push({
        path: "/my_share_monthly_earnings",
        query: {
          uid: this.uid
        }
      });
    },
    onClickRight() {
      if (this.$cookies.get("first_login") != 0) {
        this.showBind = true;
        return;
      }
      this.profitAlertShow = true;
    },
    profitLfClick() {
      if (this.$cookies.get("first_login") != 0) {
        this.showBind = true;
        return;
      }
      // 跳往推荐人界面
      if (this.userData.parent_user.is_show_sales == 1) {
        this.$router.push({
          path: "/my_share_tuijianren",
          query: {
            uid: this.uid,
            user_id: this.userData.parent_user.id
          }
        });
      }
    },
    myShareMemberCodeClick() {
      if (this.$cookies.get("first_login") != 0) {
        this.showBind = true;
        return;
      }
      // 跳往服务商会员码页面
      this.$router.push({
        path: "/my_share_huiyuanma",
        query: {
          uid: this.uid
        }
      });
    },
    incomeClick() {
      if (this.$cookies.get("first_login") != 0) {
        this.showBind = true;
        return;
      }
      this.$router.push({
        path: "/my_share_income",
        query: {
          uid: this.uid,
          user_id: this.userData.user_info.id
        }
      });
    },
    myTeamClick() {
      if (this.$cookies.get("first_login") != 0) {
        this.showBind = true;
        return;
      }
      this.$router.push({
        path: "/my_share_team",
        query: {
          uid: this.uid
        }
      });
    },
    onClickLeft() {
      this.$router.back();
    },
    //升级弹窗
    upgradeShow() {
      if (this.$cookies.get("first_login") != 0) {
        this.showBind = true;
        return;
      }
      this.show = true;
    },
    qrCode() {
      if (this.$cookies.get("first_login")!=0) {
        this.showBind = true;
        return ;
      }
      this.$router.push({
        path: "/received",
        query: {
          uid: this.uid
        }
      });
    },
    //分销用户个人信息
    async getUser() {
      let params = {
        token: this.$cookies.get("token"),
        user_id: ""
      };
      const res = await this.$axios.post(this.$api.getUser, params);
      if (res.code == 1) {
        this.userData = res.data;
        if (this.userData.user_info.vip_type_name == "普通用户") {
          this.ordinaryShow = true;
          this.superShow = false;
          this.memberShow = false;
          this.revInfoInnerShow = true;
          this.memberUpShow = false;
          this.tableShow = false;
          this.recentGainsShow = false;
          this.profitShow = true;
        } else if (this.userData.user_info.vip_type_name == "超级会员") {
          this.superShow = true;
          this.partnerShow = false;
          this.ordinaryShow = false;
          this.memberShow = false;
          this.revInfoInnerShow = false;
          this.tableShow = true;
          this.recentGainsShow = true;
          this.profitShow = true;
        } else if (this.userData.user_info.vip_type_name == "城市合伙人") {
          this.superShow = false;
          this.partnerShow = true;
          this.ordinaryShow = false;
          this.memberShow = false;
          this.revInfoInnerShow = false;
          this.tableShow = true;
          this.recentGainsShow = true;
        } else if (this.userData.user_info.vip_type_name == "普通会员") {
          this.superShow = false;
          this.partnerShow = false;
          this.ordinaryShow = false;
          this.memberShow = true;
          this.revInfoInnerShow = true;
          this.memberUpShow = true;
          this.tableShow = false;
          this.recentGainsShow = false;
        }
        if (this.userData.user_info.is_show_sales == 1) {
          this.profitDialogTitle = "是否向我推荐的人取消展示收益？";
          this.profitDialogText = "确认即取消展示我的收益.";
        } else {
          this.profitDialogTitle = "是否向我推荐的人展示收益？";
          this.profitDialogText = "确认即展示我的收益.";
        }
      } else {
        this.$toast("获取用户信息失败:" + res.msg);
      }
    },

    //用户收益明细
    async getEarnings() {
      let params = {
        token: this.$cookies.get("token"),
        page: ""
      };
      const res = await this.$axios.post(this.$api.getEarnings, params);
      if (res.code == 1) {
        this.earnings = res.data;
        let money = Number(this.earnings.money).toFixed(2);
        this.earnings.money = money;
        this.earnings.forEach((item, index) => {
          if (item.vip_type == "城市合伙人") {
            this.hehuorenShow = true;
            this.huiyuanShow = false;
            this.fuwushangShow = false;
            this.sharerShow = false;
          } else if (item.vip_type == "超级会员") {
            this.hehuorenShow = false;
            this.huiyuanShow = true;
            this.fuwushangShow = false;
            this.sharerShow = false;
          } else if (item.vip_type == "会员") {
            this.hehuorenShow = false;
            this.huiyuanShow = false;
            this.fuwushangShow = false;
            this.sharerShow = true;
          } else if (item.vip_type == "城市服务商") {
            this.hehuorenShow = false;
            this.huiyuanShow = false;
            this.fuwushangShow = true;
            this.sharerShow = false;
          } else {
            this.hehuorenShow = false;
            this.huiyuanShow = false;
            this.fuwushangShow = false;
            this.sharerShow = false;
            item.vip_type = "普通用户";
          }
        });
      } else {
        this.$toast("获取用户收益明细失败:" + res.msg);
      }
    },
    //用户本周及上周收益
    async getWeekEarnings() {
      let params = {
        token: this.$cookies.get("token")
      };
      const res = await this.$axios.post(this.$api.getWeekEarnings, params);
      if (res.code == 1) {
        this.weekEarnings = res.data;
        let this_week = Number(this.weekEarnings.this_week).toFixed(2);
        let last_week = Number(this.weekEarnings.last_week).toFixed(2);
        this.weekEarnings.this_week = this_week;
        this.weekEarnings.last_week = last_week;
      } else {
        this.$toast("获取用户本周及上周收益信息失败：" + res.msg);
      }
    },
    async getMonthEarnings() {
      let params = {
        token: this.$cookies.get("token")
      };
      const res = await this.$axios.post(this.$api.getMonthEarnings, params);
      if (res.code == 1) {
        this.monthEarnings = res.data;
        this.monthEarnings.forEach((item, index) => {
          let first_earnings = Number(item.first_earnings).toFixed(2);
          let secend_earnings = Number(item.secend_earnings).toFixed(2);
          let earnings_all = Number(item.earnings_all).toFixed(2);
          let sales_all = Number(item.sales_all).toFixed(2);
          item.first_earnings = first_earnings;
          item.secend_earnings = secend_earnings;
          item.earnings_all = earnings_all;
          item.sales_all = sales_all;
        });
      } else {
        this.$toast("获取用户至成为会员至今的帐单（月份）信息失败：" + res.msg);
      }
    },
    //展示收益
    async showSales() {
      let params = {
        token: this.$cookies.get("token")
      };
      const res = await this.$axios.post(this.$api.showSales, params);
      if (res.code == 1) {
        if (res.msg == "展示分销") {
          this.profitDialogTitle = "是否向我推荐的人取消展示收益？";
          this.profitDialogText = "确认即取消展示我的收益.";
        } else {
          this.profitDialogTitle = "是否向我推荐的人展示收益？";
          this.profitDialogText = "确认即展示我的收益.";
        }
        this.$toast(res.msg);
      } else {
        this.$toast(res.msg);
      }
    },
    async upUserVip() {
      let params = {
        token: this.$cookies.get("token")
      };
      const res = await this.$axios.post(this.$api.upUserVip, params);
      if (res.code == 1) {
        this.alertShow = true;
        this.show = false;
      } else {
        this.$toast("升级失败：" + res.msg);
      }
    },
    vipUp() {
       if (this.$cookies.get("first_login") != 0) {
        this.showBind = true;
        return;
      }
      this.alertShow = false;
      this.getUser();
    },
    getUrlParame(parameName, url) {
      let parames = url.substring(url.indexOf("?"));
      if (parames.indexOf(parameName) > -1) {
        let parameValue;
        if (parames.indexOf("&") > -1) {
          let arr=parames.split('&');
          let newArr=[];
          arr.forEach((item,index)=>{
            let obj={};
            obj.key=item.split('=')[0];
            obj.value=item.split('=')[1];
            newArr.push(obj);
          });
          newArr.forEach((item,index)=>{
              if(item.key==parameName){
                parameValue=item.value;
              };
          });
         
        } else {
          parameValue = parames.substring(
            parames.indexOf(parameName),
            parames.length
          );
          parameValue=parameValue.split('=')[1];
        }
        return parameValue;
      }
      return "";
    }
  }
};
</script>
<style scoped>
.index {
  background-color: #fff;
  background: url(../assets/images/bj.png) no-repeat;
  background-size: 100% auto;
  background-color: #fff;
  padding-top: 0.46rem;
}
.van-nav-bar__title {
  color: #fff;
}
.van-nav-bar {
  background: #70c2ef;
}
.van-nav-bar .van-icon {
  color: #fff;
}
.van-nav-bar__text {
  color: #fff;
}
.header >>> [class*="van-hairline"]::after {
  border: none;
}
.user-info {
  width: 100%;
  margin-top: 0.22rem;
  padding: 0 0.15rem;
  display: flex;
  justify-content: space-between;
}
.portrait {
  width: 0.61rem;
  height: 0.61rem;
  border-radius: 50%;
}
.user-info-lf {
  display: flex;
}
.user-info-mid {
  margin: 0.06rem 0 0 0.13rem;
}
.user-info-mid p {
  font-size: 0.18rem;
  color: #fff;
  margin-bottom: 0.19rem;
  line-height: 0.18rem;
}
.ordinary {
  font-size: 0.12rem;
  color: #fff;
  line-height: 0.12rem;
}
.super,
.partner {
  display: block;
  display: flex;
  align-items: flex-end;
}
.super img {
  width: 0.13rem;
}
.super i,
.partner i {
  font-size: 0.12rem;
  color: #fff;
  white-space: nowrap;
  margin-left: 0.05rem;
  line-height: 0.12rem;
}
.partner img {
  width: 0.15rem;
}
.partner i {
  display: flex;
  align-items: flex-end;
}
.partner i span {
  display: block;
  width: 0.1rem;
  height: 0.13rem;
  background: #fff;
  margin: 0 0.5em;
}
.user-info-rt {
  padding-top: 0.04rem;
}
.user-info-rt p {
  font-size: 0.12rem;
  color: #fff;
}
.user-info-rt .time2 {
  margin-top: 0.12rem;
}
.profit {
  width: 3.46rem;
  height: 1.67rem;
  background-color: #fff;
  border-radius: 0.05rem;
  box-shadow: 0 0.05rem 0.06rem 0 rgba(0, 0, 0, 0.14);
  margin: 0.17rem auto 0;
  padding: 0.12rem 0.12rem 0.1rem 0.14rem;
  display: flex;
  justify-content: space-between;
}
.middleProfit {
  width: 3.46rem;
  background-color: #fff;
  border-radius: .05rem;
  box-shadow: 0 .05rem .06rem 0 rgba(0,0,0, 0.14);
  margin: .17rem auto 0;
  padding: .25rem 0;

}
.middleProfitApply{
  display: flex;
  flex-direction: column;
  align-items: center;
}
.apply {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.45rem;
  height: .36rem;
  background-color: #00C6D8;
  border-radius: .18rem;
}
.middleProfitApply span {
  font-size: .12rem;
  color: #8C8D8D;
  margin-top: .12rem;
}
.apply img {
  width: 0.17rem;
}
.apply p {
  font-size: .12rem;
  color: #fff;
  margin-left: .13rem;
}
.applyCity {
  margin-top: .32rem;
}
.applyPartner {
  margin-top: .34rem;
}
.profit .left {
  display: flex;
  flex-direction: column;
  /* justify-content: space-between; */
  flex: auto;
}
.member img {
  width: 0.18rem;
}
.profit .leftClass {
  justify-content: space-between;
}
.profit-lf-top {
  display: flex;
}
.profit-lf-top img {
  width: 0.19rem;
}
.profit-lf-top span {
  font-size: 0.16rem;
  color: #000;
  font-weight: 400;
  margin-left: 0.07rem;
}
.profit-lf-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
}
.profit-lf-mid .number {
  font-size: 0.24rem;
  color: #00c6d8;
}
.profit-lf-mid .numberName {
  font-size: 0.15rem;
  color: #000;
  margin-top: 0.16rem;
}
.profit-lf-bt {
  display: flex;
  align-items: center;
}
.profit-lf-bt .pic {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 0.1rem;
}
.profit-lf-bt .pic img {
  width: 100%;
}
.profit-lf-bt .name span {
  font-size: 0.12rem;
  color: #000;
  padding-right: 0.07rem;
}
.profit-lf-bt .name {
  display: flex;
}
.profit-lf-bt .name i {
  font-size: 0.12rem;
  color: #000;
  padding-left: 0.07rem;
  border-left: 1px solid #000;
}
.profit .right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}
.profit .right .number {
  font-size: 0.16rem;
  color: #00c6d8;
  text-align: right;
  margin-bottom: 0.03rem;
}
.profit .right .number1 {
  color: #fc9142;
}
.profit .right .numberName {
  font-size: 0.12rem;
  color: #000;
}
.middle {
  padding: 0.3rem 0 0.23rem;
}
.middle .shar {
  display: block;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  width: 2.9rem;
  height: 0.33rem;
  border-radius: 0.05rem;
  background-color: #00c6d8;
  margin: 0 auto;
}
.middle .shar img {
  display: block;
  width: 0.1rem;
  margin-left: 0.1rem;
}
.table {
  margin: 0 auto;
  width: 3.52rem;
}
.middle ul {
  display: flex;
}
.middle ul li {
  display: block;
  width: 0.88rem;
  height: 0.88rem;
  background: url(../assets/images/yuanjiao.png);
  font-size: 0.16rem;
  text-align: center;
  padding: 0.21rem 0 0.25rem 0;
  color: #ffff;
}
.rev-info {
  width: 100%;
  background-color: #f3f3f3;
  padding-top: 0.07rem;
  position: relative;
}
.rev-info-inner {
  background-color: #fff;
  padding: 0.13rem 0 0 0.15rem;
}
.upgrade {
  width: 0.5rem;
  height: 0.22rem;
  display: block;
  text-align: center;
  color: #fff;
  font-size: 0.14rem;
  line-height: 0.22rem;
  background-color: #00c6d8;
  position: absolute;
  top: -0.06rem;
  right: 0.15rem;
}
.rev-info-inner-top {
  display: flex;
  justify-content: space-between;
  padding-right: 0.15rem;
}
.rev-info-inner-top-lf {
  display: flex;
  align-items: flex-end;
  white-space: nowrap;
}
.rev-info-inner-top-lf img {
  width: 0.22rem;
}
.rev-info-inner-top-lf p {
  font-size: 0.15rem;
  color: #000;
  margin-left: 0.07rem;
}
.rev-info-inner-top-lf i {
  font-size: 0.12rem;
  color: #00c6d8;
  margin-left: 0.07rem;
}
.rev-info-inner-top .shared-number,
.rev-info-inner-top .member-up {
  display: block;
  text-align: center;
  height: 0.22rem;
  color: #fff;
  font-size: 0.14rem;
  line-height: 0.22rem;
  background-color: #00c6d8;
  padding: 0 0.08rem 0 0.11rem;
}
.sharer {
  width: 100%;
  display: flex;
  align-items: flex-start;
  padding-top: 0.15rem;
}
.sharer img {
  width: 0.42rem;
}
.sharer-rt {
  padding-bottom: 0.13rem;
  padding-right: 0.15rem;
  border-bottom: 1px solid #e9e9e9;
  flex: auto;
  margin-left: 0.15rem;
  display: flex;
  flex-direction: column;
}
.sharer-rt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sharer-rt-top p {
  font-size: 0.14rem;
  color: #343434;
  line-height: 0.14rem;
}
.sharer-rt-top-rt {
  display: flex;
  align-items: center;
}
.sharer-rt-top-rt img {
  width: 0.13rem;
  margin-right: 0.05rem;
}
.sharer-rt-top-rt i {
  font-size: 0.12rem;
  color: #8b8b8b;
}
.sharer-rt-bt {
  display: flex;
  justify-content: space-between;
  margin-top: 0.1rem;
}
.sharer-rt-bt p {
  font-size: 0.12rem;
  color: #8b8b8b;
}
.sharer-rt-bt i {
  font-size: 0.12rem;
  color: #00c6d8;
}
.recent-gains-top {
  display: flex;
}
.recent-gains-top img {
  width: 0.2rem;
}
.recent-gains-top p {
  font-size: 0.15rem;
  color: #000;
  margin-left: 0.1rem;
}
.dividend {
  align-self: center;
  display: flex;
  align-items: center;
}
.dividend p {
  font-size: 0.16rem;
  color: #ff2736;
}
.dividend i {
  font-size: 0.12rem;
  color: #000;
  display: block;
  margin-left: 0.08rem;
  padding-left: 0.08rem;
  border-left: 1px solid #000;
  line-height: 0.12rem;
}
.van-dialog {
  border-radius: 0.15rem;
}
.van-dialog >>> .van-dialog__header {
  font-size: 0.18rem;
  color: #232828;
}

.van-dialog >>> .van-dialog__message {
  font-size: 0.12rem;
  color: #232828;
  text-align: left;
}
.alert {
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.alert-inner-top {
  width: 2.94rem;
  height: 2.16rem;
}
.alert-inner-top img {
  width: 100%;
}
.alert-inner-bt {
  width: 2.94rem;
  height: 1.32rem;
  background: url(../assets/images/alert2.png) no-repeat;
  background-size: 100% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.alert-inner-bt p {
  font-size: 0.15rem;
  color: #353535;
  margin-top: 0.22rem;
}
.alert-inner-bt span {
  width: 2.03rem;
  height: 0.44rem;
  background: linear-gradient(
    0deg,
    rgba(1, 190, 208, 1) 0%,
    rgba(124, 193, 241, 1) 100%
  );
  border-radius: 18px;
  text-align: center;
  line-height: 0.44rem;
  color: #fffef7;
  font-size: 0.19rem;
  margin-top: 0.23rem;
}
.profit-alert >>> .van-dialog__message {
  text-align: center;
}
</style>


